/*
 *      stone.h
 *      
 *      Copyright 2008 Antti Leivo <skylark@skylark-desktop>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */

#ifndef WORLD_H
#define WORLD_H

#include <vector>
#include "stone.h"
#include "chipmunk.h"


#define WORLD_GRAVITY_CONSTANT 0.00005
//#define WORLD_SOLVER_ITERATIONS 3

typedef enum {sysUnready, sysRunnable, sysRunning, sysShuttingDown, sysFailure} ESysStatus;

class World
{
	public:

	  World(void);
      ~World();
	  void step(float _time=0.03);
	  void insertStone(Stone *s);

	  ESysStatus getStatus();
	  cpSpace *space;
      std::vector<Stone *> stones;
	
	private:
  	  /* add your private declarations */
      ESysStatus status;
	  //collision(Stone *s1, Stone *s2); // merge objects?

	float time;
};

#endif /* WORLD_H */ 
